#version 310 es
#ifdef GL_EXT_shader_texture_lod
#extension GL_EXT_shader_texture_lod : enable
#endif

precision highp float;
precision highp int;
#define HLSLCC_ENABLE_UNIFORM_BUFFERS 1
#if HLSLCC_ENABLE_UNIFORM_BUFFERS
#define UNITY_UNIFORM
#else
#define UNITY_UNIFORM uniform
#endif
#define UNITY_SUPPORTS_UNIFORM_LOCATION 1
#if UNITY_SUPPORTS_UNIFORM_LOCATION
#define UNITY_LOCATION(x) layout(location = x)
#define UNITY_BINDING(x) layout(binding = x, std140)
#else
#define UNITY_LOCATION(x)
#define UNITY_BINDING(x) layout(std140)
#endif
uniform 	vec4 _ScaledScreenParams;
uniform 	vec2 _GlobalMipBias;
uniform 	vec4 _MainLightPosition;
uniform 	mediump vec4 _MainLightColor;
uniform 	mediump vec4 _AmbientOcclusionParam;
uniform 	vec4 _FPParams0;
uniform 	vec4 _FPParams1;
uniform 	vec4 _AdditionalLightsPosition[16];
uniform 	mediump vec4 _AdditionalLightsColor[16];
uniform 	mediump vec4 _AdditionalLightsAttenuation[16];
uniform 	mediump vec4 _AdditionalLightsSpotDir[16];
uniform 	vec3 _WorldSpaceCameraPos;
uniform 	vec4 unity_OrthoParams;
uniform 	vec4 hlslcc_mtx4x4unity_MatrixV[4];
uniform 	vec4 _MainLightShadowParams;
UNITY_BINDING(0) uniform URP_ZBinBuffer {
	vec4                URP_ZBins[1024];
};
UNITY_BINDING(1) uniform urp_TileBuffer {
	vec4                urp_Tiles[1024];
};
UNITY_BINDING(2) uniform UnityPerDraw {
	vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_ObjectToWorld[4];
	vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_WorldToObject[4];
	vec4 Xhlslcc_UnusedXunity_LODFade;
	mediump vec4 Xhlslcc_UnusedXunity_WorldTransformParams;
	vec4 Xhlslcc_UnusedXunity_RenderingLayer;
	mediump vec4 Xhlslcc_UnusedXunity_LightData;
	mediump vec4 Xhlslcc_UnusedXunity_LightIndices[2];
	vec4 Xhlslcc_UnusedXunity_ProbesOcclusion;
	mediump vec4 Xhlslcc_UnusedXunity_SpecCube0_HDR;
	mediump vec4 Xhlslcc_UnusedXunity_SpecCube1_HDR;
	vec4 Xhlslcc_UnusedXunity_SpecCube0_BoxMax;
	vec4 Xhlslcc_UnusedXunity_SpecCube0_BoxMin;
	vec4 Xhlslcc_UnusedXunity_SpecCube0_ProbePosition;
	vec4 Xhlslcc_UnusedXunity_SpecCube1_BoxMax;
	vec4 Xhlslcc_UnusedXunity_SpecCube1_BoxMin;
	vec4 Xhlslcc_UnusedXunity_SpecCube1_ProbePosition;
	vec4 Xhlslcc_UnusedXunity_LightmapST;
	vec4 Xhlslcc_UnusedXunity_DynamicLightmapST;
	mediump vec4                unity_SHAr;
	mediump vec4                unity_SHAg;
	mediump vec4                unity_SHAb;
	mediump vec4                unity_SHBr;
	mediump vec4                unity_SHBg;
	mediump vec4                unity_SHBb;
	mediump vec4                unity_SHC;
	vec4 Xhlslcc_UnusedXunity_RendererBounds_Min;
	vec4 Xhlslcc_UnusedXunity_RendererBounds_Max;
	vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_MatrixPreviousM[4];
	vec4 Xhlslcc_UnusedXhlslcc_mtx4x4unity_MatrixPreviousMI[4];
	vec4 Xhlslcc_UnusedXunity_MotionVectorsParams;
};
UNITY_BINDING(3) uniform UnityPerMaterial {
	vec4 Xhlslcc_UnusedX_SoftParticleFadeParams;
	vec4 Xhlslcc_UnusedX_CameraFadeParams;
	vec4 Xhlslcc_UnusedX_BaseMap_ST;
	mediump vec4                _BaseColor;
	mediump vec4 Xhlslcc_UnusedX_EmissionColor;
	mediump vec4 Xhlslcc_UnusedX_BaseColorAddSubDiff;
	mediump vec4 Xhlslcc_UnusedX_SpecColor;
	mediump float Xhlslcc_UnusedX_Cutoff;
	mediump float Xhlslcc_UnusedX_Smoothness;
	mediump float Xhlslcc_UnusedX_DistortionStrengthScaled;
	mediump float Xhlslcc_UnusedX_DistortionBlend;
	mediump float                _Surface;
};
UNITY_LOCATION(0) uniform mediump sampler2D _ScreenSpaceOcclusionTexture;
UNITY_LOCATION(1) uniform mediump sampler2D _MainLightShadowmapTexture;
UNITY_LOCATION(2) uniform mediump sampler2DShadow hlslcc_zcmp_MainLightShadowmapTexture;
UNITY_LOCATION(3) uniform mediump sampler2D _BaseMap;
layout(location = 0) in highp vec2 vs_TEXCOORD0;
layout(location = 1) in mediump vec4 vs_COLOR0;
layout(location = 2) in highp vec4 vs_TEXCOORD1;
layout(location = 3) in mediump vec3 vs_TEXCOORD2;
layout(location = 4) in highp vec4 vs_TEXCOORD7;
layout(location = 0) out mediump vec4 SV_Target0;
mediump vec4 u_xlat16_0;
vec4 u_xlat1;
bool u_xlatb1;
mediump vec3 u_xlat16_2;
mediump vec4 u_xlat16_3;
mediump vec3 u_xlat16_4;
vec2 u_xlat5;
int u_xlati5;
uvec2 u_xlatu5;
vec3 u_xlat6;
ivec3 u_xlati6;
uint u_xlatu6;
bool u_xlatb6;
vec3 u_xlat7;
ivec3 u_xlati7;
bool u_xlatb7;
vec3 u_xlat8;
mediump vec3 u_xlat16_9;
mediump vec3 u_xlat16_10;
mediump vec3 u_xlat16_14;
float u_xlat16;
int u_xlati16;
uint u_xlatu16;
float u_xlat17;
ivec3 u_xlati17;
float u_xlat27;
ivec2 u_xlati28;
float u_xlat34;
mediump float u_xlat16_34;
uint u_xlatu34;
bool u_xlatb34;
mediump float u_xlat16_35;
int u_xlati38;
uint u_xlatu38;
bool u_xlatb38;
float u_xlat39;
uint u_xlatu39;
float u_xlat40;
int int_bitfieldExtract(int value, int offset, int bits) {
#if defined(GL_ES) && __VERSION__ <= 300
    return (bits == 0) ? 0 : (offset + bits < 32) ? ((value << (32 - bits - offset)) >> (32 - bits)) : (value >> offset);
#else
    return bitfieldExtract(value, offset, (offset + bits < 32) ? bits : (32 - offset));
#endif
}

void main()
{
vec4 hlslcc_FragCoord = vec4(gl_FragCoord.xyz, 1.0/gl_FragCoord.w);
    u_xlat16_0 = texture(_BaseMap, vs_TEXCOORD0.xy, _GlobalMipBias.x);
    u_xlat16_0 = u_xlat16_0 * _BaseColor;
    u_xlat16_0 = u_xlat16_0 * vs_COLOR0;
    u_xlat1.x = dot(vs_TEXCOORD2.xyz, vs_TEXCOORD2.xyz);
    u_xlat1.x = inversesqrt(u_xlat1.x);
    u_xlat1.xyz = u_xlat1.xxx * vs_TEXCOORD2.xyz;
    u_xlat1.w = 1.0;
    u_xlat16_2.x = dot(unity_SHAr, u_xlat1);
    u_xlat16_2.y = dot(unity_SHAg, u_xlat1);
    u_xlat16_2.z = dot(unity_SHAb, u_xlat1);
    u_xlat16_3 = u_xlat1.yzzx * u_xlat1.xyzz;
    u_xlat16_4.x = dot(unity_SHBr, u_xlat16_3);
    u_xlat16_4.y = dot(unity_SHBg, u_xlat16_3);
    u_xlat16_4.z = dot(unity_SHBb, u_xlat16_3);
    u_xlat16_35 = u_xlat1.y * u_xlat1.y;
    u_xlat16_35 = u_xlat1.x * u_xlat1.x + (-u_xlat16_35);
    u_xlat16_3.xyz = unity_SHC.xyz * vec3(u_xlat16_35) + u_xlat16_4.xyz;
    u_xlat16_2.xyz = u_xlat16_2.xyz + u_xlat16_3.xyz;
    u_xlat16_2.xyz = max(u_xlat16_2.xyz, vec3(0.0, 0.0, 0.0));
    u_xlat5.xy = vec2(1.0) / vec2(_ScaledScreenParams.xy);
    u_xlat5.xy = u_xlat5.xy * hlslcc_FragCoord.xy;
    u_xlat16_34 = texture(_ScreenSpaceOcclusionTexture, u_xlat5.xy, _GlobalMipBias.x).x;
    u_xlat27 = u_xlat16_34 + -1.0;
    u_xlat27 = _AmbientOcclusionParam.w * u_xlat27 + 1.0;
    u_xlat16_35 = min(u_xlat16_34, 1.0);
    vec3 txVec0 = vec3(vs_TEXCOORD7.xy,vs_TEXCOORD7.z);
    u_xlat16_34 = textureLod(hlslcc_zcmp_MainLightShadowmapTexture, txVec0, 0.0);
    u_xlat16_3.x = (-_MainLightShadowParams.x) + 1.0;
    u_xlat16_3.x = u_xlat16_34 * _MainLightShadowParams.x + u_xlat16_3.x;
    u_xlatb34 = 0.0>=vs_TEXCOORD7.z;
    u_xlatb38 = vs_TEXCOORD7.z>=1.0;
    u_xlatb34 = u_xlatb34 || u_xlatb38;
    u_xlat16_3.x = (u_xlatb34) ? 1.0 : u_xlat16_3.x;
    u_xlat6.xyz = vs_TEXCOORD1.xyz + (-_WorldSpaceCameraPos.xyz);
    u_xlat34 = dot(u_xlat6.xyz, u_xlat6.xyz);
    u_xlat34 = u_xlat34 * _MainLightShadowParams.z + _MainLightShadowParams.w;
    u_xlat34 = clamp(u_xlat34, 0.0, 1.0);
    u_xlat16_14.x = (-u_xlat16_3.x) + 1.0;
    u_xlat16_3.x = u_xlat34 * u_xlat16_14.x + u_xlat16_3.x;
    u_xlat16_14.xyz = vec3(u_xlat27) * _MainLightColor.xyz;
    u_xlat16_2.xyz = vec3(u_xlat16_35) * u_xlat16_2.xyz;
    u_xlat7.xyz = u_xlat16_3.xxx * u_xlat16_14.xyz;
    u_xlat16_35 = dot(u_xlat1.xyz, _MainLightPosition.xyz);
    u_xlat16_35 = clamp(u_xlat16_35, 0.0, 1.0);
    u_xlat16_3.xyz = vec3(u_xlat16_35) * u_xlat7.xyz;
    u_xlat16_3.xyz = u_xlat16_0.xyz * u_xlat16_3.xyz;
    u_xlatu34 = uint(_FPParams0.w);
    u_xlatu38 = min(u_xlatu34, 16u);
    u_xlat16_4.x = float(0.0);
    u_xlat16_4.y = float(0.0);
    u_xlat16_4.z = float(0.0);
    for(uint u_xlatu_loop_1 = 0u ; u_xlatu_loop_1<u_xlatu38 ; u_xlatu_loop_1++)
    {
        u_xlat7.xyz = (-vs_TEXCOORD1.xyz) * _AdditionalLightsPosition[int(u_xlatu_loop_1)].www + _AdditionalLightsPosition[int(u_xlatu_loop_1)].xyz;
        u_xlat40 = dot(u_xlat7.xyz, u_xlat7.xyz);
        u_xlat40 = max(u_xlat40, 6.10351562e-05);
        u_xlat8.x = inversesqrt(u_xlat40);
        u_xlat7.xyz = u_xlat7.xyz * u_xlat8.xxx;
        u_xlat8.x = float(1.0) / float(u_xlat40);
        u_xlat40 = u_xlat40 * _AdditionalLightsAttenuation[int(u_xlatu_loop_1)].x;
        u_xlat16_35 = (-u_xlat40) * u_xlat40 + 1.0;
        u_xlat16_35 = max(u_xlat16_35, 0.0);
        u_xlat16_35 = u_xlat16_35 * u_xlat16_35;
        u_xlat40 = u_xlat16_35 * u_xlat8.x;
        u_xlat16_35 = dot(_AdditionalLightsSpotDir[int(u_xlatu_loop_1)].xyz, u_xlat7.xyz);
        u_xlat16_35 = u_xlat16_35 * _AdditionalLightsAttenuation[int(u_xlatu_loop_1)].z + _AdditionalLightsAttenuation[int(u_xlatu_loop_1)].w;
        u_xlat16_35 = clamp(u_xlat16_35, 0.0, 1.0);
        u_xlat16_35 = u_xlat16_35 * u_xlat16_35;
        u_xlat40 = u_xlat16_35 * u_xlat40;
        u_xlat16_9.xyz = vec3(u_xlat27) * _AdditionalLightsColor[int(u_xlatu_loop_1)].xyz;
        u_xlat8.xyz = vec3(u_xlat40) * u_xlat16_9.xyz;
        u_xlat16_35 = dot(u_xlat1.xyz, u_xlat7.xyz);
        u_xlat16_35 = clamp(u_xlat16_35, 0.0, 1.0);
        u_xlat16_9.xyz = vec3(u_xlat16_35) * u_xlat8.xyz;
        u_xlat16_4.xyz = u_xlat16_9.xyz * u_xlat16_0.xyz + u_xlat16_4.xyz;
    }
    u_xlatu38 = uint(_FPParams1.w);
    if(u_xlatu38 != uint(0)) {
        u_xlat5.xy = u_xlat5.xy * _FPParams1.xy;
        u_xlatu5.xy = uvec2(u_xlat5.xy);
        u_xlatu39 = uint(_FPParams1.z);
        u_xlati5 = int(u_xlatu5.y) * int(u_xlatu39) + int(u_xlatu5.x);
        u_xlatu5.x = u_xlatu38 * uint(u_xlati5);
        u_xlat7.x = (-hlslcc_mtx4x4unity_MatrixV[0].z);
        u_xlat7.y = (-hlslcc_mtx4x4unity_MatrixV[1].z);
        u_xlat7.z = (-hlslcc_mtx4x4unity_MatrixV[2].z);
        u_xlat16 = dot(u_xlat7.xyz, u_xlat6.xyz);
        u_xlatb6 = unity_OrthoParams.w==0.0;
        u_xlat17 = log2(u_xlat16);
        u_xlat16 = (u_xlatb6) ? u_xlat17 : u_xlat16;
        u_xlat16 = u_xlat16 * _FPParams0.x + _FPParams0.y;
        u_xlatu16 = uint(u_xlat16);
        u_xlatu16 = min(u_xlatu16, 4095u);
        u_xlati38 = int(u_xlatu38) + 2;
        u_xlatu6 = uint(u_xlati38) * u_xlatu16;
        u_xlatu16 = u_xlatu16 * uint(u_xlati38) + 2u;
        u_xlatu38 = u_xlatu6 >> (2u & uint(0x1F));
        u_xlati6.xy = ivec2(int_bitfieldExtract(int(u_xlatu6), int(0) & int(0x1F), int(1) & int(0x1F)), int_bitfieldExtract(int(u_xlatu6), int(1) & int(0x1F), int(1) & int(0x1F)));
        u_xlati28.xy = ivec2(uvec2(u_xlati6.xx) & uvec2(floatBitsToUint(URP_ZBins[int(u_xlatu38)].wy)));
        u_xlati7.xy = ~(u_xlati6.xy);
        u_xlati7.xz = ivec2(uvec2(u_xlati7.xx) & uvec2(floatBitsToUint(URP_ZBins[int(u_xlatu38)].zx)));
        u_xlati6.xz = ivec2(uvec2(u_xlati28.xy) | uvec2(u_xlati7.xz));
        u_xlati38 = int(uint(u_xlati6.y) & uint(u_xlati6.x));
        u_xlati6.x = int(uint(u_xlati7.y) & uint(u_xlati6.z));
        u_xlatu38 = uint(u_xlati38) | uint(u_xlati6.x);
        u_xlatu6 = u_xlatu5.x >> (2u & uint(0x1F));
        u_xlati17.xy = ivec2(int_bitfieldExtract(int(u_xlatu5.x), int(0) & int(0x1F), int(1) & int(0x1F)), int_bitfieldExtract(int(u_xlatu5.x), int(1) & int(0x1F), int(1) & int(0x1F)));
        u_xlati7.xy = ivec2(uvec2(u_xlati17.xx) & uvec2(floatBitsToUint(urp_Tiles[int(u_xlatu6)].wy)));
        u_xlati17.xz = ~(u_xlati17.xy);
        u_xlati6.xy = ivec2(uvec2(u_xlati17.xx) & uvec2(floatBitsToUint(urp_Tiles[int(u_xlatu6)].zx)));
        u_xlati6.xy = ivec2(uvec2(u_xlati6.xy) | uvec2(u_xlati7.xy));
        u_xlati5 = int(uint(u_xlati17.y) & uint(u_xlati6.x));
        u_xlati6.x = int(uint(u_xlati17.z) & uint(u_xlati6.y));
        u_xlati5 = int(uint(u_xlati5) | uint(u_xlati6.x));
        u_xlatu6 = u_xlatu16 >> (2u & uint(0x1F));
        u_xlati17.xy = ivec2(int_bitfieldExtract(int(u_xlatu16), int(0) & int(0x1F), int(1) & int(0x1F)), int_bitfieldExtract(int(u_xlatu16), int(1) & int(0x1F), int(1) & int(0x1F)));
        u_xlati7.xy = ivec2(uvec2(u_xlati17.xx) & uvec2(floatBitsToUint(URP_ZBins[int(u_xlatu6)].wy)));
        u_xlati17.xz = ~(u_xlati17.xy);
        u_xlati6.xy = ivec2(uvec2(u_xlati17.xx) & uvec2(floatBitsToUint(URP_ZBins[int(u_xlatu6)].zx)));
        u_xlati6.xy = ivec2(uvec2(u_xlati6.xy) | uvec2(u_xlati7.xy));
        u_xlati16 = int(uint(u_xlati17.y) & uint(u_xlati6.x));
        u_xlati6.x = int(uint(u_xlati17.z) & uint(u_xlati6.y));
        u_xlati16 = int(uint(u_xlati16) | uint(u_xlati6.x));
        u_xlati5 = int(uint(u_xlati16) & uint(u_xlati5));
        u_xlati16 = int(0xFFFFFFFFu) << (int(u_xlatu38) & int(0x1F));
        u_xlati5 = int(uint(u_xlati16) & uint(u_xlati5));
        u_xlatu16 = u_xlatu38 >> (16u & uint(0x1F));
        u_xlatu16 = (-u_xlatu16) + 31u;
        u_xlatu16 = 4294967295u >> (u_xlatu16 & uint(0x1F));
        u_xlati5 = int(u_xlatu16 & uint(u_xlati5));
    } else {
        u_xlati5 = 0;
    }
    u_xlat16_9.xyz = u_xlat16_4.xyz;
    u_xlati16 = u_xlati5;
    while(true){
        if(u_xlati16 == 0) {break;}
        u_xlati38 = findLSB(uint(u_xlati16));
        u_xlati6.x = 1 << (u_xlati38 & int(0x1F));
        u_xlati16 = int(uint(u_xlati16) ^ uint(u_xlati6.x));
        u_xlati38 = int(u_xlatu34) + u_xlati38;
        u_xlat6.xyz = (-vs_TEXCOORD1.xyz) * _AdditionalLightsPosition[u_xlati38].www + _AdditionalLightsPosition[u_xlati38].xyz;
        u_xlat39 = dot(u_xlat6.xyz, u_xlat6.xyz);
        u_xlat39 = max(u_xlat39, 6.10351562e-05);
        u_xlat7.x = inversesqrt(u_xlat39);
        u_xlat6.xyz = u_xlat6.xyz * u_xlat7.xxx;
        u_xlat7.x = float(1.0) / float(u_xlat39);
        u_xlat39 = u_xlat39 * _AdditionalLightsAttenuation[u_xlati38].x;
        u_xlat16_35 = (-u_xlat39) * u_xlat39 + 1.0;
        u_xlat16_35 = max(u_xlat16_35, 0.0);
        u_xlat16_35 = u_xlat16_35 * u_xlat16_35;
        u_xlat39 = u_xlat16_35 * u_xlat7.x;
        u_xlat16_35 = dot(_AdditionalLightsSpotDir[u_xlati38].xyz, u_xlat6.xyz);
        u_xlat16_35 = u_xlat16_35 * _AdditionalLightsAttenuation[u_xlati38].z + _AdditionalLightsAttenuation[u_xlati38].w;
        u_xlat16_35 = clamp(u_xlat16_35, 0.0, 1.0);
        u_xlat16_35 = u_xlat16_35 * u_xlat16_35;
        u_xlat39 = u_xlat16_35 * u_xlat39;
        u_xlat16_10.xyz = vec3(u_xlat27) * _AdditionalLightsColor[u_xlati38].xyz;
        u_xlat7.xyz = vec3(u_xlat39) * u_xlat16_10.xyz;
        u_xlat16_35 = dot(u_xlat1.xyz, u_xlat6.xyz);
        u_xlat16_35 = clamp(u_xlat16_35, 0.0, 1.0);
        u_xlat16_10.xyz = vec3(u_xlat16_35) * u_xlat7.xyz;
        u_xlat16_9.xyz = u_xlat16_10.xyz * u_xlat16_0.xyz + u_xlat16_9.xyz;
    }
    u_xlat16_2.xyz = u_xlat16_2.xyz * u_xlat16_0.xyz + u_xlat16_3.xyz;
    SV_Target0.xyz = u_xlat16_9.xyz + u_xlat16_2.xyz;
    u_xlatb1 = _Surface==1.0;
    SV_Target0.w = (u_xlatb1) ? u_xlat16_0.w : 1.0;
    return;
}


// Keywords: PROCEDURAL_INSTANCING_ON _FORWARD_PLUS _MAIN_LIGHT_SHADOWS _SCREEN_SPACE_OCCLUSION
// 